package tech.xiaozai.rbac;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
import tech.xiaozai.rbac.config.AppConfig;
import tech.xiaozai.rbac.config.WebConfig;
import tech.xiaozai.rbac.security.config.MySecurityConfig;

/**
 * @author xiaozai
 * @version 1.0
 * @date 2020-09-15 11:02
 */
public class MyWebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {

    @Override
    protected Class<?>[] getRootConfigClasses() {
        //注意采用根容器的配置类:  它定义在rbac-service包中
        return new Class<?>[] { AppConfig.class,  WebConfig.class, MySecurityConfig.class};
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {

        return null;
    }

    @Override
    protected String[] getServletMappings() {
        return new String[] { "/" };
    }
}
